package com.baimifan.renovation.tools;

import android.content.Context;
import android.content.SharedPreferences;

/**
 * Created by baimifan on 2017/07/06.
 */

public class Shares {
    private SharedPreferences sp;

    private SharedPreferences.Editor editor;

    public Shares (Context context) {
        sp = context.getSharedPreferences("data", context.MODE_PRIVATE);
        editor = sp.edit();
    }

    public void setCityId (String id) {
        editor.putString("cityId", id);
        editor.commit();
    }

    public String getCityId () {
        return sp.getString("cityId", "1");
    }

}
